<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css画一个三角形</title>
    <style>
        #triangle{
            margin: 50px auto;
            width: 0;
            height: 0;
            border-left: 100px solid #000000;
            border-right: 100px solid rgba(0,0,0,0);
            border-bottom: 100px solid rgba(0,0,0,0);
            border-top: 100px solid rgba(0,0,0,0);
        }
    </style>
</head>
<body>
<div id="triangle">

</div>
</body>
</html>